<?php
session_start();

require_once("database.include.php");

	print "Users (table user)<br/><table border=`1`>";
	print "<tr><td bgcolor=darkgray><font color=white>name</font></td>
	<td bgcolor=darkgray><font color=white>password</font></td>
	<td bgcolor=darkgray><font color=white>public_key</font></td></tr>";
	
    $sql = 'SELECT `name`, `password`, `public_key` FROM `user` ORDER BY `name`';
    
    foreach ($conn->query($sql) as $row) {
    	print "<tr>";
        print "<td>" . $row['name'] . "</td>";
        print "<td>" . $row['password'] . "</td>";
        print "<td>" . $row['public_key'] . "</td>";
        print "</tr>";
    }
    print "</table>";

?>